package com.zhoux.basics;

import java.util.Scanner;

/**
 * @author taoyi
 * @version 1.0
 * @date 2021/3/2 16:08
 */
public class IfDemo {
    public static void main(String[] args) {
        double price;
        Scanner in =new Scanner(System.in);
        System.out.println("请输入金额：");
        price = in.nextDouble();
        if(price>=500){
            price *= 0.8;
            System.out.println("满500打8折：");
        }else if (price>=600){
            price *= 0.7;
            System.out.println("满600打7折：");
        }else {
            price *= 0.95;
            System.out.println("未满500打95折：");
        }
        System.out.println(price);
    }
}

